﻿package  {
	
	public class Ultralisk extends Monster {
		
		public static const MOVEMENT_SPEED:Number = 10;

		public function Ultralisk(p_X:Number,p_Y:Number) {
			this.x = p_X;
			this.y = p_Y;
			this.setHp(60);
			this.setAttackDamage(30);
			this.setSpeed(1);
		}
		
		public function moveMonster(dir:Number):void
		{
			switch (dir)
			{
				case Monster.HAUT :
				{
					if (this.y - Ultralisk.MOVEMENT_SPEED >= 0)
						this.y -= Ultralisk.MOVEMENT_SPEED;
					break;
				}
				case Monster.DROITE :
				{
					if(this.x + this.width + Ultralisk.MOVEMENT_SPEED <= stage.width)
						this.x += Ultralisk.MOVEMENT_SPEED;
					break;
				}
				case Monster.BAS :
				{
					if (this.y + Ultralisk.MOVEMENT_SPEED <= stage.height)
						this.y+= Ultralisk.MOVEMENT_SPEED;
					break;
				}
				case Monster.GAUCHE :
				{
					if(this.x - Ultralisk.MOVEMENT_SPEED >= 0)
						this.x -= Ultralisk.MOVEMENT_SPEED;
					break;
				}
			}
		}

	}
	
}
